# 项目执行命令，并发送cable消息
class ExecWorker
  include Sidekiq::Worker

  def perform(project_id, actions, user_id)
    Session.set_user(User.find user_id)
    p = Project.find(project_id)
    actions.each { |a| p.send(*a) }
    p.do!

  end
end